home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / iffhandle.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-09  |  8.4 KB  |  219 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AIFFHandle wrapper class                                                  *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_IFFHandle_H
  12. #define ASAP_IFFHandle_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <Proto/IFFParse.h>
  19. }
  20.  
  21. class AIFFHandle : public IFFHandle
  22. {
  23.  public:
  24.  inline static AIFFHandle * AllocIFF();
  25.  inline void * operator new(size_t);
  26.  inline void CloseIFF();
  27.  inline LONG CollectionChunk(long type, long id);
  28.  inline LONG CollectionChunks(LONG * propArray, long numPairs);
  29.  inline ContextNode * CurrentChunk();
  30.  inline LONG EntryHandler(long type, long id, long position, struct Hook * handler, APTR object);
  31.  inline LONG ExitHandler(long type, long id, long position, struct Hook * handler, APTR object);
  32.  inline CollectionItem * FindCollection(long type, long id);
  33.  inline LocalContextItem * FindLocalItem(long type, long id, long ident);
  34.  inline StoredProperty * FindProp(long type, long id);
  35.  inline ContextNode * FindPropContext();
  36.  inline void FreeIFF();
  37.  inline void operator delete (void *);
  38.  inline void InitIFF(long flags, struct Hook * streamHook);
  39.  inline void InitIFFasClip();
  40.  inline void InitIFFasDOS();
  41.  inline LONG OpenIFF(long rwMode);
  42.  inline LONG ParseIFF(long control);
  43.  inline LONG PopChunk();
  44.  inline LONG PropChunk(long type, long id);
  45.  inline LONG PropChunks(LONG * propArray, long numPairs);
  46.  inline LONG PushChunk(long type, long id, long size);
  47.  inline LONG ReadChunkBytes(APTR buf, long numBytes);
  48.  inline LONG ReadChunkRecords(APTR buf, long bytesPerRecord, long numRecords);
  49.  inline LONG StopChunk(long type, long id);
  50.  inline LONG StopChunks(LONG * propArray, long numPairs);
  51.  inline LONG StopOnExit(long type, long id);
  52.  inline void StoreItemInContext(struct LocalContextItem * localItem, struct ContextNode * contextNode);
  53.  inline LONG StoreLocalItem(struct LocalContextItem * localItem, long position);
  54.  inline LONG WriteChunkBytes(APTR buf, long numBytes);
  55.  inline LONG WriteChunkRecords(APTR buf, long bytesPerRecord, long numRecords);
  56. };
  57. //----------------------------------------------------------------------------
  58. AIFFHandle * AIFFHandle::AllocIFF ()
  59. {
  60.  return (AIFFHandle *) ::AllocIFF();
  61. }
  62. //----------------------------------------------------------------------------
  63. void * AIFFHandle::operator new (size_t)
  64. {
  65.  return AIFFHandle::AllocIFF();
  66. }
  67. //----------------------------------------------------------------------------
  68. void AIFFHandle::CloseIFF ()
  69. {
  70.  ::CloseIFF(this);
  71. }
  72. //----------------------------------------------------------------------------
  73. LONG AIFFHandle::CollectionChunk (long type, long id)
  74. {
  75.  return ::CollectionChunk(this, type, id);
  76. }
  77. //----------------------------------------------------------------------------
  78. LONG AIFFHandle::CollectionChunks (LONG * propArray, long numPairs)
  79. {
  80.  return ::CollectionChunks(this, propArray, numPairs);
  81. }
  82. //----------------------------------------------------------------------------
  83. ContextNode * AIFFHandle::CurrentChunk ()
  84. {
  85.  return ::CurrentChunk(this);
  86. }
  87. //----------------------------------------------------------------------------
  88. LONG AIFFHandle::EntryHandler (long type, long id, long position, struct Hook * handler, APTR object)
  89. {
  90.  return ::EntryHandler(this, type, id, position, handler, object);
  91. }
  92. //----------------------------------------------------------------------------
  93. LONG AIFFHandle::ExitHandler (long type, long id, long position, struct Hook * handler, APTR object)
  94. {
  95.  return ::ExitHandler(this, type, id, position, handler, object);
  96. }
  97. //----------------------------------------------------------------------------
  98. CollectionItem * AIFFHandle::FindCollection (long type, long id)
  99. {
  100.  return ::FindCollection(this, type, id);
  101. }
  102. //----------------------------------------------------------------------------
  103. LocalContextItem * AIFFHandle::FindLocalItem (long type, long id, long ident)
  104. {
  105.  return ::FindLocalItem(this, type, id, ident);
  106. }
  107. //----------------------------------------------------------------------------
  108. StoredProperty * AIFFHandle::FindProp (long type, long id)
  109. {
  110.  return ::FindProp(this, type, id);
  111. }
  112. //----------------------------------------------------------------------------
  113. ContextNode * AIFFHandle::FindPropContext ()
  114. {
  115.  return ::FindPropContext(this);
  116. }
  117. //----------------------------------------------------------------------------
  118. void AIFFHandle::FreeIFF ()
  119. {
  120.  ::FreeIFF(this);
  121. }
  122. //----------------------------------------------------------------------------
  123. void AIFFHandle::operator delete (void *iff)
  124. {
  125.  ((AIFFHandle *) iff)->FreeIFF();
  126. }
  127. //----------------------------------------------------------------------------
  128. void AIFFHandle::InitIFF (long flags, struct Hook * streamHook)
  129. {
  130.  ::InitIFF(this, flags, streamHook);
  131. }
  132. //----------------------------------------------------------------------------
  133. void AIFFHandle::InitIFFasClip ()
  134. {
  135.  ::InitIFFasClip(this);
  136. }
  137. //----------------------------------------------------------------------------
  138. void AIFFHandle::InitIFFasDOS ()
  139. {
  140.  ::InitIFFasDOS(this);
  141. }
  142. //----------------------------------------------------------------------------
  143. LONG AIFFHandle::OpenIFF (long rwMode)
  144. {
  145.  return ::OpenIFF(this, rwMode);
  146. }
  147. //----------------------------------------------------------------------------
  148. LONG AIFFHandle::ParseIFF (long control)
  149. {
  150.  return ::ParseIFF(this, control);
  151. }
  152. //----------------------------------------------------------------------------
  153. LONG AIFFHandle::PopChunk ()
  154. {
  155.  return ::PopChunk(this);
  156. }
  157. //----------------------------------------------------------------------------
  158. LONG AIFFHandle::PropChunk (long type, long id)
  159. {
  160.  return ::PropChunk(this, type, id);
  161. }
  162. //----------------------------------------------------------------------------
  163. LONG AIFFHandle::PropChunks (LONG * propArray, long numPairs)
  164. {
  165.  return ::PropChunks(this, propArray, numPairs);
  166. }
  167. //----------------------------------------------------------------------------
  168. LONG AIFFHandle::PushChunk (long type, long id, long size)
  169. {
  170.  return ::PushChunk(this, type, id, size);
  171. }
  172. //----------------------------------------------------------------------------
  173. LONG AIFFHandle::ReadChunkBytes (APTR buf, long numBytes)
  174. {
  175.  return ::ReadChunkBytes(this, buf, numBytes);
  176. }
  177. //----------------------------------------------------------------------------
  178. LONG AIFFHandle::ReadChunkRecords (APTR buf, long bytesPerRecord, long numRecords)
  179. {
  180.  return ::ReadChunkRecords(this, buf, bytesPerRecord, numRecords);
  181. }
  182. //----------------------------------------------------------------------------
  183. LONG AIFFHandle::StopChunk (long type, long id)
  184. {
  185.  return ::StopChunk(this, type, id);
  186. }
  187. //----------------------------------------------------------------------------
  188. LONG AIFFHandle::StopChunks (LONG * propArray, long numPairs)
  189. {
  190.  return ::StopChunks(this, propArray, numPairs);
  191. }
  192. //----------------------------------------------------------------------------
  193. LONG AIFFHandle::StopOnExit (long type, long id)
  194. {
  195.  return ::StopOnExit(this, type, id);
  196. }
  197. //----------------------------------------------------------------------------
  198. void AIFFHandle::StoreItemInContext (struct LocalContextItem * localItem, struct ContextNode * contextNode)
  199. {
  200.  ::StoreItemInContext(this, localItem, contextNode);
  201. }
  202. //----------------------------------------------------------------------------
  203. LONG AIFFHandle::StoreLocalItem (struct LocalContextItem * localItem, long position)
  204. {
  205.  return ::StoreLocalItem(this, localItem, position);
  206. }
  207. //----------------------------------------------------------------------------
  208. LONG AIFFHandle::WriteChunkBytes (APTR buf, long numBytes)
  209. {
  210.  return ::WriteChunkBytes(this, buf, numBytes);
  211. }
  212. //----------------------------------------------------------------------------
  213. LONG AIFFHandle::WriteChunkRecords (APTR buf, long bytesPerRecord, long numRecords)
  214. {
  215.  return ::WriteChunkRecords(this, buf, bytesPerRecord, numRecords);
  216. }
  217.  
  218. #endif
  219.